package fr.inserm.um915.bdibd.model;

import java.util.Comparator;

import com.sleepycat.bind.tuple.IntegerBinding;
import com.sleepycat.je.DatabaseEntry;

public class SortedIntegerComparator implements Comparator<byte[]>
	{
	@Override
	public int compare(byte[] o1, byte[] o2)
		{
		IntegerBinding b=new IntegerBinding();
		int s1= b.entryToObject(new DatabaseEntry(o1));
		int s2= b.entryToObject(new DatabaseEntry(o2));
		return s1-s2;
		}
	}
